﻿using Digitalmes.Core.Domain.Eitites;

namespace Digitalmes.Core.Services;

/// <summary>
/// 转盘实时数据服务
/// </summary>
public interface ITurntableRealtimeService : IApplicationService
{
    /// <summary>
    /// 分页查询
    /// </summary>
    Task<(List<TurntableRealtimeRecord>, int)> GetPageListAsync(DateTime? startTime, DateTime? endTime, int pageIndex, int pageSize, CancellationToken cancellationToken = default);

    /// <summary>
    /// 获取实时数据记录列表
    /// </summary>
    /// <param name="startTime"></param>
    /// <param name="endTime"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<List<TurntableRealtimeRecord>> GetListAsync(DateTime? startTime, DateTime? endTime, CancellationToken cancellationToken = default);

    /// <summary>
    /// 新增实时数据。
    /// </summary>
    /// <param name="input"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task InsertAsync(TurntableRealtimeRecord input, CancellationToken cancellationToken = default);
}
